<?php
ob_start();
session_start();
include_once("../UserIncludes/DbConfig.php");
set_magic_quotes_runtime(1);
$adspId = $_REQUEST[adspaceid];
$adsiteId = $_REQUEST[adsiteid];
if($_SESSION['langId']!="")
{
	$langId=$_SESSION['langId'];
}
else
{
	$langId="1";
}
$sql="select s.*,adm.* FROM ".SITEMASTER." as s,".ADSPSCEMASTER." as adm where s.langId='".$langId."' and adm.adspaceId='".$adspId."' and s.adsiteId=adm.adsiteId";
$query=mysql_query($sql);
$result= mysql_fetch_array($query);
$explodeDate = explode(' ' ,$result[publishDate]);
 $siteUrlReplaced = str_replace("http://","",$result[adSiteUrl]);
					$siteUrlReplaceWWW = str_replace("www.","",$siteUrlReplaced);
?>

<table cellpadding="2" cellspacing="2" class="login_txt" width="100%">
 			<tr>

              <td valign="top" colspan="3" align="left" class="listHeader">&nbsp;<?php echo str_replace('.com','',$siteUrlReplaceWWW);?></td>
			</tr>
            <tr>

              <td valign="top" width="40%" align="left">
               <table cellpadding="2" cellspacing="2" class="login_txt" width="100%">
					<tr><TD valign="top" align="left">
					Available: <?php echo $explodeDate[0];?></TD></tr>
                <tr><TD valign="top" align="center"><img src="images/noimage.jpg" border="0"></TD></tr>
				</table>
              </td>
			<td width="1%">&nbsp;</td>	
              <td width="59%" style="vertical-align: top; padding-top: 0px;">

                <table cellpadding="2" cellspacing="2" class="login_txt" width="100%">
                  <tr><td align="left">Top 3 countries:</td></tr>
                  <tr><td align="left">1. United States ( 21.57% )</td></tr>
                  <tr><td align="left">2. Germany ( 14.90% )</td></tr>
                  <tr><td align="left">3. United Kingdom ( 7.29% )</td></tr>
                  <tr><td align="left"><span style="padding-right: 2px;"><strong>Site Rating</strong>:</span> <?php echo $result[adsSiteRating];?></td></tr>
                  <tr><td align="left"><A href="<?php echo $result[adSiteUrl];?>"><strong><?php echo $result[adSiteUrl];?></strong></A></td></tr>
                </table>
              </td>

            </tr>
          </table>
          <hr>
          <table width="100%" class="login_txt">
            <tr><td align="left"><strong>Site Description:</strong></td></tr>
            <tr><td align="left"><?php echo stripslashes($result[siteDescription]);?></td></tr>
          </table>
          <hr>

          <table  width="100%" cellspacing="4" class="login_txt">
           <tr>
              <td align="left" style="width: 300px;"><strong>Ad Space Description:</strong></td>
              <td align="left" style="width: 250px;"><strong>Tags:</strong></td>
            </tr> 
            <tr>
              <td align="left" style="vertical-align: top;"><?php echo stripslashes($result[description]);?></td>
              <td align="left" style="vertical-align: top;"><?php echo $result[tags];?></td>

            </tr>
          </table>